package kr.ac.kd.handler;

import java.util.HashMap;

import kr.ac.kd.ServerCommunicator;
import kr.ac.kd.ServerRequest;
import kr.ac.kd.ServerResponse;
import kr.ac.kd.ServerResponseException;

public class DataHandler {

	
	public static ServerResponse send(String id, HashMap<String, Object> param){
		ServerResponse resp = null;
		
		try {
			resp = ServerCommunicator.send(new ServerRequest(id, param));
		} catch (ServerResponseException e) {
			System.out.println("문제가 생겼습니다. 관리자에게 연락해 주십시오.");
			e.printStackTrace();
		}
		
		return resp;
	}
}
